/* Grundlayout */
body {
  font-family: "Inter", sans-serif;
  background: #1e1e1e;
  color: #f7f3e9;
  margin: 0;
  padding: 0;
}

/* Überschrift */
h1, h2 {
  text-align: center;
  font-family: "Playfair Display", serif;
  margin-top: 20px;
  color: #f2d36b;
}

/* Container */
.tierlist {
  max-width: 900px;
  margin: 30px auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Jede Tier-Reihe */
.tier-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #2a2a2a;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}
.tier-row:hover { transform: scale(1.01); }



/* Dropzone */
.tier-dropzone {
  flex: 1;
  min-height: 80px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
  border: 2px dashed #777;
  border-radius: 10px;
  background: #1e1e1e;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.tier-dropzone.over {
  border-color: #f2d36b;
  background: #2f2f2f;
}

/* Item-Pool */
.item-pool {
  max-width: 900px;
  margin: 30px auto;
  padding: 14px;
  background: #2a2a2a;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Items */
.item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #c46a4a, #f2d36b);
  color: #222;
  cursor: grab;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.3s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
}
.item:hover {transform: scale(1.05);   background: linear-gradient(135deg, #c46a4a, #f2d36b);}
.item:active {cursor: grabbing; transform: scale(1.08);}

/* Default image size — smaller now */
.item-img {
  max-height: 90px;   /* was 96px width — now height-limited */
  width: auto;
  object-fit: contain;
  border-radius: 8px;
}

/* Landscape images — slightly larger but still compact */
.item.landscape {
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px;
}

.item.landscape .item-img {
  max-height: 120px;  /* was 192px — now MUCH smaller */
  width: auto;
}

/* Text stays unchanged */
.item-number {
  font-weight: 700;
  flex: 0 0 auto;
}

.item-label {
  color: #222;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}

/* Responsive */
@media (max-width: 600px) {
  .item-img { max-height: 70px; }
  .item.landscape .item-img { max-height: 100px; }
}

/* Light Mode */
body.light { background: #f7f3e9; color: #222; }
body.light .tier-row { background: #ffffff; }
body.light .tier-dropzone { background: #f7f3e9; border-color: #ccc; }
body.light .item-pool { background: #ffffff; }
body.light .item {   background: linear-gradient(135deg, #c46a4a, #f2d36b); color: #222; }

/* Button Style */
.mode-btn {
  display: block;
  margin: 10px auto;
  padding: 10px 20px;
  border-radius: 999px;
  background: #e7c247;
  color: #333333;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}
.mode-btn:hover { transform: scale(1.05); }

.link {
  text-align: center;
  font-family: "Playfair Display", serif;
  margin-top: 20px;
  color: #f2d36b;
}
/* Tier-Label S */
.tier-label_S {
  width: 70px;
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
  padding: 10px 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #c45757, #a30202);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

/* Tier-Label A */
.tier-label_A {
  width: 70px;
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
  padding: 10px 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #f3c589, #ff9100);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

/* Tier-Label B */
.tier-label_B {
  width: 70px;
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
  padding: 10px 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #88ffce, #33ff00);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

/* Tier-Label C */
.tier-label_C {
  width: 70px;
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
  padding: 10px 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #baf2fa, #0099ff);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

/* Tier-Label D */
.tier-label_D {
  width: 70px;
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
  padding: 10px 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #e0b3fa, #ea00ff);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}